home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 684 / 684.xpi / chrome / fireftp.jar / content / js / dialogs / preferences.js < prev    next >
Text File  |  2007-08-21  |  1KB  |  38 lines

  1. function readPreferences() {
  2.   window.sizeToContent();
  3.   portChange();
  4.   timeoutChange();
  5.   filemodeChange();
  6.   integrateChange();
  7.   activePortChange();
  8. }
  9.  
  10. function portChange() {
  11.   $('proxyhost').disabled      =  $('proxytype').value == "";
  12.   $('proxyport').disabled      =  $('proxytype').value == "";
  13.   $('proxyhostlabel').disabled =  $('proxytype').value == "";
  14.   $('proxyportlabel').disabled =  $('proxytype').value == "";
  15. }
  16.  
  17. function timeoutChange() {
  18.   $('retrylabel').disabled     = !$('timeoutmode').checked;
  19.   $('retry').disabled          = !$('timeoutmode').checked;
  20.   $('attemptslabel').disabled  = !$('timeoutmode').checked;
  21.   $('attempts').disabled       = !$('timeoutmode').checked;
  22. }
  23.  
  24. function filemodeChange() {
  25.   $('asciibutton').disabled    =  $('filemode').value != 0;
  26. }
  27.  
  28. function integrateChange() {
  29.   $('temppasvmode').disabled   = !$('integrateftplinks').checked;
  30. }
  31.  
  32. function activePortChange() {
  33.   $('activelowportlabel').disabled  = !$('activeportmode').checked;
  34.   $('activelowport').disabled       = !$('activeportmode').checked;
  35.   $('activehighportlabel').disabled = !$('activeportmode').checked;
  36.   $('activehighport').disabled      = !$('activeportmode').checked;
  37. }
  38.